//
// Created by Administrator on 2023/8/2.
//

#include <iostream>
#include <vector>

using namespace std;

class Solution {
public:
    int maximumXOR(vector<int> &nums) {
        // 取出nums中所有的1
        int ans = 0;
        for (auto &x: nums) {
            ans |= x;
        }
        return ans;
    }
};

int main() {
    Solution s;
    vector<int> nums = {3, 10, 5, 25, 2, 8};
    cout << s.maximumXOR(nums) << endl;
    return 0;
}